package main

import (
	"fmt"
	"google.golang.org/grpc"
	"ms-produce/service"
	"net"
)

func main() {
	rpcServer := grpc.NewServer()
	fmt.Println(rpcServer)
	service.RegisterProdServiceServer(rpcServer, service.ProductService)

	listenter, err := net.Listen("tcp", ":3008")
	if err != nil {
		fmt.Println(err)
		return
	}
	fmt.Println("启动服务")
	err = rpcServer.Serve(listenter)
	if err != nil {
		fmt.Println(err)
		return
	}
}
